home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
c_lib.arc
/
UTINIT.C
< prev
next >
Wrap
Text File
|
1990-08-09
|
1KB
|
42 lines
/**
*
* Name utinit -- Initialize registers for call to dos
*
* Synopsis iret = utinit(preg);
* int iret Return value is always 0
* struct dreg *preg Pointer to dos register structure
*
* Description This function initializes the registers pointed to by
* preg to the default values in preparation for a
* call to the DOS gate, dos. The DS and ES registers
* are set to the current values, but all other registers
* are set to 0.
*
* Version 1.1 (C)Copyright Blaise Computing Inc. 1983, 1984
*
**/
struct dreg
{
unsigned ax,bx,cx,dx,si,di,ds,es;
};
int utinit(preg)
struct dreg *preg;
{
unsigned cs,ss,ds,es;
utsreg(&cs,&ss,&ds,&es);
preg->ds = ds; /* Default Data Segment */
preg->es = es; /* Extra segment value */
preg->ax = 0;
preg->bx = 0;
preg->cx = 0;
preg->dx = 0;
preg->si = 0;
preg->di = 0;
return(0);
}